<%@ page import="sugarbind_input.Structure" %>



<div class="fieldcontain ${hasErrors(bean: structureInstance, field: 'iupac', 'error')} required">
	<label for="iupac">
		<g:message code="structure.iupac.label" default="Iupac" />
		<span class="required-indicator">*</span>
	</label>
	<g:textField name="iupac" required="" value="${structureInstance?.iupac}"/>
</div>

<div class="fieldcontain ${hasErrors(bean: structureInstance, field: 'glycoct', 'error')} ">
	<label for="glycoct">
		<g:message code="structure.glycoct.label" default="Glycoct" />
		
	</label>
	<g:textField name="glycoct" value="${structureInstance?.glycoct}"/>
</div>


<div class="fieldcontain ${hasErrors(bean: structureInstance, field: 'glycosuite_Id', 'error')} ">
	<label for="glycosuite_Id">
		<g:message code="structure.glycosuite_Id.label" default="Glycosuite Id" />
		
	</label>
	<g:field name="glycosuite_Id" type="number" value="${structureInstance.glycosuite_Id}"/>
</div>

<div class="fieldcontain ${hasErrors(bean: structureInstance, field: 'cfg', 'error')} ">
	<label for="cfg">
		<g:message code="structure.cfg.label" default="Cfg" />
		
	</label>
	<input type="file" id="cfg" name="cfg" />
</div>

<div class="fieldcontain ${hasErrors(bean: structureInstance, field: 'uoxfcol', 'error')} ">
	<label for="uoxfcol">
		<g:message code="structure.uoxfcol.label" default="Uoxfcol" />
		
	</label>
	<input type="file" id="uoxfcol" name="uoxfcol" />
</div>

<div class="fieldcontain ${hasErrors(bean: structureInstance, field: 'text', 'error')} ">
	<label for="text">
		<g:message code="structure.text.label" default="Text" />
		
	</label>
	<input type="file" id="text" name="text" />
</div>

<div class="fieldcontain ${hasErrors(bean: structureInstance, field: 'ligands', 'error')} ">
	<label for="ligands">
		<g:message code="structure.ligands.label" default="Ligands" />
		
	</label>
	
<ul class="one-to-many">
<g:each in="${structureInstance?.ligands?}" var="l">
    <li><g:link controller="ligand" action="show" id="${l.id}">${l?.encodeAsHTML()}</g:link></li>
</g:each>
<li class="add">
<g:link controller="ligand" action="create" params="['structure.id': structureInstance?.id]">${message(code: 'default.add.label', args: [message(code: 'ligand.label', default: 'Ligand')])}</g:link>
</li>
</ul>

</div>

